package com.rao.gmall.feign.order;

import com.rao.gmall.feign.order.fallback.OrderFeignClientFallback;
import com.rao.gmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author nzmxfan
 * @create 2021-08-20-19:09
 */
@FeignClient(value = "service-order", fallback = OrderFeignClientFallback.class)
@RequestMapping("/api/order")
public interface OrderFeignClient {

    @PostMapping("/auth/submitOrder")
    public void submitOrder(@RequestParam("tradeNo") Integer tradeNo);

    @GetMapping("/getorder/{id}")
    OrderInfo getOrderInfo(@PathVariable("id") Long orderId);

    @GetMapping("/pay/success")
    void changeOrderStatusPayed(@RequestParam("outTradeNo") String outTradeNo);
}
